home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / BDiamond / CError.h < prev    next >
Encoding:
Text File  |  1996-12-20  |  1.3 KB  |  60 lines  |  [TEXT/CWIE]

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. //    This file is a BDIAMOND addition.
  4. //
  5.  
  6. #ifndef __CError_h__
  7. #define __CError_h__
  8.  
  9. class CErrorControl;
  10.  
  11. /////////////////////////////////////////////////////////////////////////////
  12. //
  13. // constants
  14. //
  15.  
  16. typedef long ErrorCode;
  17.  
  18. // define the ErrorCode baselines for all CError objects
  19. #define BaseErrorCode                100
  20. #define BaseErrorCodeTicker            200
  21. #define BaseErrorCodePopup            300
  22. #define BaseErrorCodeButton            400
  23. #define BaseErrorCodeConsole        500
  24. #define BaseErrorCodeLabel            600
  25. #define BaseErrorCodeGradient        700
  26. #define BaseErrorCodePopupWindow    800
  27.  
  28. // define the generic errors
  29. #define FAILED_ASSERTION_ERROR    (BaseErrorCode + 1)
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32. //
  33. // utility macros
  34. //
  35.  
  36. #define ISERROR(x,y) ((x) == (y))
  37.  
  38. #define VOLATILE
  39.  
  40. /////////////////////////////////////////////////////////////////////////////
  41. //
  42. // CError class definition
  43. //
  44.  
  45. class CError
  46. {
  47. public:
  48.     CError(ErrorCode error);
  49.     CError(ErrorCode error, CErrorControl * control);
  50.     
  51.     virtual void Init(ErrorCode error, CErrorControl * control = NULL);
  52.     virtual void HandleError(void);
  53.  
  54. protected:
  55.     ErrorCode             mErrorCode;
  56.     CErrorControl *     mControl;
  57. };
  58.  
  59. #endif // __CError_h__
  60.